<?php

namespace common\behaviors;

use yii\base\Behavior;
use yii\web\User;
use Yii;
use yii\log\Logger;
/**
 * @author Eugene Terentev <eugene@terentev.net>
 */
class LogoutTimestampBehavior extends Behavior
{

    /**
     * @inheritdoc
     */
    public function events()
    {
        return [

            User::EVENT_AFTER_LOGOUT=>'afterLogout',
        ];
    }



    public function afterLogout($event){
       // $user = $event->identity;

        //Yii::error('test','test');
        Yii::getLogger()->log("this is logger demo ", Logger::LEVEL_ERROR, 'test');

    }
}
